/**
 * Created by Freeman on 2016/7/14.
 */
import {SEARCH} from '../constants/ActionTypes'
import avatar2 from '../../../static/img/2.png'
import avatar3 from '../../../static/img/3.jpg'

const initialState  = {
    items: [
        {
            id: 2,
            name: 'Vue.js',
            img: avatar2
        },
        {
            id: 3,
            name: 'webpack',
            img: avatar3
        }
    ],
    search: '',
};

export default function userlist(state = initialState,action) {
    switch (action.type){
        case SEARCH:
            return {
                ...state,search:action.search
            };
        default :
            return state;

    }
}